1. Field of the Invention
This invention relates to apparatus and methods for image data compression and decompression.
2. Description of the Related Art
It is known to take account of a detection of a so-called "activity" level of a block of image pixels in determining an appropriate degree of quantisation to be applied as part of a data compression process for that block of pixels.
GB-A-2 306 832 describes a data compression and decompression system of this type, in which blocks of pixels are subjected to discrete cosine transformation (DCT), quantisation and then entropy encoding for recording on a tape medium. Because the channel data capacity of the tape medium is limited, it is necessary to adjust the degree of compression applied to the image data to ensure that the tape data capacity is not exceeded by generating too much compressed data, while at the same time the available channel capacity is not wasted by generating too little compressed data. Therefore, the degree of quantisation applied to the DCT data is adjusted between blocks or groups of blocks to maintain a substantially constant data rate.
In this previously proposed system, the degree of quantisation is also adjusted between blocks according to the image "activity" of the blocks. In other words, how the block activity is used to determine how heavily individual blocks of an image should be compressed relative to other blocks, within an overall target bit rate for the compressed image.
The block activity is therefore essentially a representation of how noticeable compression artefacts will be in that block, compared to their visibility in other blocks. For example, in a block containing very little image detail (a "smooth" image area) compression artefacts might be more visible in the ultimate compressed and decompressed image than in an area containing a lot of image detail--where the artefacts would be "lost" in the other image detail of the block.
When the compressed image data is encoded, it is necessary to indicate the degree of compression (e.g. the degree of quantisation) applied to each block or group of blocks of the image, so that the correct decompression can be applied to reconstruct the image later. One way of encoding this information is to indicate a "base" quantisation level to be applied to pixels of an area of the image, with variations from that base quantisation level (e.g. in response to the activity assessment) being indicated on a block-by-block basis.
This arrangement requires an amount of header data for each block of the image, just to store the activity level in order to specify the modification to be applied to the "base" quantisation level for that block. If more data is allowed for this purpose, a greater resolution can be used in the activity measurement, but this data overhead has to be balanced against the general requirement in image compression systems to use as little of the available data rate as possible for header and other control data.
It is an object of the invention to provide an improved technique for handling activity codes in data compression and decompression apparatus and methods.